package com.pwt.repository;

import com.pwt.repository.base.BaseRepository;
import com.pwt.entity.WhatAttribute;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * WhatAttribute Repository层
 *
 * @author auto generated
 * @date 2021-09-04 14:18:52
 */
public interface WhatAttributeRepository extends BaseRepository<WhatAttribute, String> {
    @Query(nativeQuery = true,value = "delete from [what_attribute] where  what_result_id  = ?1")
    @Modifying
    void deleteByWhatId(String resultId);

    @Query(nativeQuery = true,value = "select product_attribute_id from [what_attribute] where  what_result_id  = ?1")
    List<String> findByWhatResultId(String whatResultId);

}
